package com.example.nettydemo.controller;

import com.example.nettydemo.dto.mock.User;
import com.example.nettydemo.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author WZW
 * @date 2020/5/11
 */
@RestController
@CrossOrigin
public class LoginController {

    @Autowired
    private UserService userService;

    @PostMapping("/login")
    public User login(String guid) {
        return userService.getOneByGuid(guid);
    }

}
